body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    min-height: 100vh;
}

.address-management {
    width: 100%;
    max-width: 1200px;
    background-color: white;
    border-radius: 8px;
    margin: 0 auto; /* 水平居中 */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin:0px 0px 24px 10px;
}

h2 {
    color: #333;
    font-size: 28px;
}

.add-address-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    margin-right: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-address-btn i {
    margin-right: 8px;
}

.add-address-btn:hover {
    background-color: #0056b3;
}

.address-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.address-table th {
    background-color: #f9f9f9;
    color: #333;
    font-weight: 500;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    transition: background-color 0.3s ease;
    word-wrap: break-word; /* 如果内容过长，允许换行 */
}

.address-table th:hover {
    background-color: #eaeaea;
}

.address-item {
    transition: background-color 0.3s ease;
}

.address-item:hover {
    background-color: #f5f5f5;
}

.address-item td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #666;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.edit-btn {
    background-color: #f0ad4e;
    color: white;
    margin-right: 8px;
    margin-bottom: 2px;
}

.edit-btn:hover {
    background-color: #ec971f;
}

.delete-btn {
    background-color: #d9534f;
    color: white;
}

.delete-btn:hover {
    background-color: #c9302c;
}

.set-default-btn {
    color: #007bff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.set-default-btn:hover {
    color: #0056b3;
}

.default-tag {
    background-color: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 12px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 400px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 16px;
}

.form-group {
    margin: 0 16px 16px 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #666;
    font-size: 16px;
}

.form-group input,
.form-group .el-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box; /* 确保内边距和边框不会增加元素的宽度 */
}

.form-group .el-select:hover {
    border-color: #999;
}

.form-group input:focus,
.form-group .el-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
}

.submit-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 8px;
}

.submit-btn:hover {
    background-color: #0056b3;
}

.cancel-btn {
    padding: 10px 20px;
    background-color: #ccc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cancel-btn:hover {
    background-color: #b3b3b3;
}

.back-button {
    margin-bottom: 20px;
    background-color: #409EFF;
    color: white;
    padding: 10px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

/* 地址省略样式 */
.ellipsis-address {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ellipsis-address:hover {
    cursor: pointer;
}

/* 让“默认地址”列文字不换行 */
/*.default-address-col {*/
/*    white-space: nowrap;*/
/*    overflow: hidden;*/
/*    text-overflow: ellipsis;*/
/*}*/

/* 媒体查询，当屏幕宽度小于 768px 时的样式 */
@media (max-width: 768px) {
    .address-management {
        padding: 16px;
    }

    h2 {
        font-size: 24px;
    }

    .add-address-btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    .address-table th, td {
        padding: 8px;
        font-size: 14px;
    }

    .action-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .modal-content {
        width: 90%;
        padding: 16px;
    }

    h3 {
        font-size: 20px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-group input,
    .form-group .el-select {
        padding: 8px;
        font-size: 12px;
    }

    .submit-btn, .cancel-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 新增样式，用于将省、市、区选择框放在一行 */
.address-select-group {
    display: flex;
    gap: 10px; /* 选择框之间的间距 */
    margin-bottom: 10px;
}

.address-select-group .el-select {
    flex: 1; /* 让每个选择框平均分配宽度 */
}